let cinema = document.querySelector(".cinema");


pAjax({
    url: "../json/cinemas-1.json",
}).then((res) => {
    res = JSON.parse(res);
    // console.log(res.data.cinemas);
    render(res.data.cinemas);
});

function render(data) {
    let str = "";
    data.forEach((item) => {
        // console.log(item);
        // console.log(item.nm);
        str += `<div class="cinema">
        <p class="cinema_name">${item.nm} <span class="price">${item.price}元起</span></p>
        <p class="site">${item.addr}
            <span class="distance">${item.distance}</span></p>
        <p>
            <span class="seat">座</span>
            <span class="recoil">退</span>
            <span class="change">改签</span>
            <span class="snack">小吃</span>
        </p>
        <p>
            <span class="concessions">惠</span>
            <span class="this_concessions">${item.promotion.platformActivityTag}</span>
        </p>
    </div>`;
    });
    // cinema.innerHTML = str;
      $('.cinema').html(str);

}